// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

    Shader "Unlit/Transparent Colored ETC1"  
    {  
        Properties  
        {  
            _MainTex ("Base (RGB)", 2D) = "black" {}  
            _MainTex_A ("Alpha (A)", 2D) = "white" {}  
        }  
          
        SubShader  
        {  
            LOD 200  
      
            Tags  
            {  
                "Queue" = "Transparent"  
                "IgnoreProjector" = "True"  
                "RenderType" = "Transparent"  
            }  
              
            Pass  
            {  
                Cull Off  
                Lighting Off  
                ZWrite Off  
                Fog { Mode Off }  
                Offset -1, -1  
                Blend SrcAlpha OneMinusSrcAlpha  
      
                CGPROGRAM  
                #pragma vertex vert  
                #pragma fragment frag             
                #include "UnityCG.cginc"  
      
                sampler2D _MainTex;  
                sampler2D _MainTex_A;  
                float4 _MainTex_ST;  
          
                struct appdata_t  
                {  
                    float4 vertex : POSITION;  
                    float2 texcoord : TEXCOORD0;  
                    fixed4 color : COLOR;  
                };  
          
                struct v2f  
                {  
                    float4 vertex : SV_POSITION;  
                    half2 texcoord : TEXCOORD0;  
                    fixed4 color : COLOR;  
                };  
          
                v2f o;  
      
                v2f vert (appdata_t v)  
                {  
                    o.vertex = UnityObjectToClipPos(v.vertex);  
                    o.texcoord = v.texcoord;  
                    o.color = v.color;  
                    return o;  
                }  
                      
                fixed4 frag (v2f IN) : COLOR  
                {  
                    fixed4 col;  
      
                    col.rgb = tex2D(_MainTex, IN.texcoord).rgb;  
                    col.a = tex2D(_MainTex_A, IN.texcoord).b;  
      
                    if (IN.color.r < 0.001 && IN.color.g > 0.001 && IN.color.b > 0.001)    
                    {    
                        float grey = dot(col.rgb, float3(0.299, 0.587, 0.114));    
                        col.rgb = float3(grey, grey, grey);    
                    }    
                    else    
                        col = col * IN.color;  
      
                    return col;  
                }  
                ENDCG  
            }  
        }  
      
        SubShader  
        {  
            LOD 100  
      
            Tags  
            {  
                "Queue" = "Transparent"  
                "IgnoreProjector" = "True"  
                "RenderType" = "Transparent"  
            }  
              
            Pass  
            {  
                Cull Off  
                Lighting Off  
                ZWrite Off  
                Fog { Mode Off }  
                Offset -1, -1  
                ColorMask RGB  
                Blend SrcAlpha OneMinusSrcAlpha  
                ColorMaterial AmbientAndDiffuse  
                  
                SetTexture [_MainTex]  
                {  
                    Combine Texture * Primary  
                }  
            }  
        }  
    }  